#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 2e5 + 10;
ll d[N];

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    ll n, m; cin >> n >> m;
    ll mx = 0;
    while (n--) {
        ll l, r, v; cin >> l >> r >> v;
        mx = max(mx, r);
        d[l] += v;
        d[r] -= v;
    }
    for (int i = 1; i <= mx; i++) {
        d[i] += d[i - 1];
    }
    int f = 0;
    for (int i = 0; i <=mx ; i++) {
        if (d[i] > m) {
            f = 1;
            break;
        }
    }
    if (f) cout << "No" << '\n';
    else cout << "Yes" << '\n';
 
    return 0;
}